-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print concrete override precondition failures #416
Print concrete override precondition failures #416
Conversation
The error messages now include the expected and actual values. These are a little more unwieldy than I'd like... |
This should be redone with unsat cores, but that will be a bit more complicated. For now, fixes GaloisInc#414.
The user will still be wondering what happened.
Do you have an example of unwieldy values? I'm inclined to merge this regardless, as it's probably more useful than what we currently have. |
Here's another example. To get an unwieldy message, you can change the global to a big struct. I'll do that in a minute and post the result here: /*
nix-shell --pure -p "with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz) {}; clang_7" --run "clang -O0 -emit-llvm -c *.c"
nix-shell --pure -p "with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz) {}; llvm_7" --run "llvm-dis *.bc"
*/
int z = 4;
int f(int x) {
return x + x;
}
int g(int x) {
z = 3;
return f(f(x));
}
int main() {
return g(5);
}
|
If we change the global in the above example to be a struct, we get something like the following. Extrapolating to larger structs (e.g. those generated by struct foo {
int u;
long w;
char o;
} foo;
|
@atomb Here's a better example of the unwieldy values:
|
Progress on #414.
Here's what the message looks like now:
re: the redundancy in the line numbers, see #415